package com.itita.ww2.game.user.insideevent;

import java.util.Iterator;
import java.util.Vector;

import com.itita.ww2.game.user.insideevent.IUserItemChangedListener.ChangedType;
import com.itita.ww2.model.item.ds.ItemValue;

public class UserInsideEventManager {
	private Vector<IUserItemChangedListener> m_ItemChangedListeners = new Vector<>();

	public void addListener(IUserItemChangedListener listener) {
		this.m_ItemChangedListeners.add(listener);
	}

	public void onUserItemChanged(ItemValue iv, ChangedType changedType) {
		for (Iterator<IUserItemChangedListener> iter = m_ItemChangedListeners.iterator(); iter.hasNext();) {
			iter.next().onUserItemChanged(iv, changedType);
		}
	}
}
